/* AI工作流浮窗样式 - 全新设计 */
.ai-workflow-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(8px);
  padding: 20px;
}

/* 重新设计的弹窗容器 */
.ai-workflow-modal-redesigned {
  width: 90vw;
  height: 85vh;
  max-width: 1200px;
  max-height: 800px;
  min-width: 800px;
  min-height: 600px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 三栏布局弹窗容器 */
.ai-workflow-modal-three-column {
  width: 95vw;
  height: 90vh;
  max-width: 1400px;
  max-height: 900px;
  min-width: 1000px;
  min-height: 700px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 保持原有弹窗样式兼容性 */
.ai-workflow-modal {
  width: 65vw;
  height: 65vh;
  max-width: 1000px;
  max-height: 700px;
  min-width: 500px;
  min-height: 500px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  flex-shrink: 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  font-size: 20px;
  color: white;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.modal-content {
  display: flex;
  flex: 1;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.left-panel, .right-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.left-panel {
  flex: 1.2; /* 给左侧面板足够空间显示内容 */
  border-right: 1px solid #e5e7eb;
  padding: 18px;
  background: #f8fafc;
}

.right-panel {
  flex: 2; /* 右侧面板仍然比左侧大，但不会太极端 */
  padding: 18px 18px 18px 18px; /* 右侧内边距保持一致 */
  background: white;
}

/* 左栏输入区域样式 */
.input-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.input-section h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
}

.workflow-input {
  width: 100%;
  flex: 1;
  min-height: 250px;
  padding: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
  resize: none;
  font-family: inherit;
  transition: all 0.2s ease;
  background: white;
}

.workflow-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.workflow-input::placeholder {
  color: #9ca3af;
  line-height: 1.5;
}

/* 底部操作区域样式 */
.bottom-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  margin-top: 12px;
}

/* 文件上传按钮样式 */
.upload-buttons {
  display: flex;
  gap: 8px;
  flex: 1;
}

.upload-btn {
  position: relative;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.upload-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.upload-btn input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* 隐藏原来的上传区域 */
.upload-section {
  display: none;
}

/* 已上传文件列表样式 */
.uploaded-files {
  margin-top: 16px;
}

.uploaded-files h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 500;
  color: #374151;
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.file-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.file-preview {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-name {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  word-break: break-all;
}

.file-size {
  font-size: 12px;
  color: #6b7280;
}

.remove-file-btn {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.remove-file-btn:hover {
  background: #fecaca;
  transform: scale(1.1);
}

/* 生成按钮样式 - 在底部操作区域 */
.generate-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  min-width: 100px;
}

.generate-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.generate-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.generate-btn.generating {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* 右栏步骤展示区域样式 */
.steps-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.steps-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.steps-container {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
  min-height: 0; /* 确保flex容器可以收缩 */
  max-height: calc(100vh - 300px); /* 设置最大高度，留出空间给其他元素 */
}

/* 工作流生成按钮 - 在右侧底部 */
.workflow-generate-section {
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.workflow-generate-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.workflow-generate-btn:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.workflow-generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 增强的步骤容器样式 - 紧凑布局 */
.enhanced-steps-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  min-height: 300px;
}

/* 增强的分支工作流可视化器 */
.branch-workflow-visualizer.enhanced {
  width: 100%;
  position: relative;
}

/* 增强的工作流类型指示器 */
.workflow-type-indicator.enhanced {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.type-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.type-badge {
  font-size: 14px;
  font-weight: 600;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.complexity-badge {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid;
}

.complexity-badge.low {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

.complexity-badge.medium {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.complexity-badge.high {
  background: #fce7f3;
  color: #be185d;
  border-color: #f9a8d4;
}

.workflow-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #64748b;
}

.step-count {
  background: white;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  font-weight: 500;
}

.workflow-desc {
  font-style: italic;
  color: #6b7280;
}

.workflow-content {
  position: relative;
}

/* 线性工作流样式 */
.linear-workflow {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.linear-step-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 并行分支工作流样式 */
.parallel-workflow {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.branch-section {
  position: relative;
  margin: 20px 0;
}

.branch-split-indicator,
.branch-merge-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 16px 0;
}

.split-line,
.merge-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  margin-bottom: 8px;
}

.split-text,
.merge-text {
  font-size: 12px;
  font-weight: 600;
  color: #667eea;
  background: white;
  padding: 4px 12px;
  border-radius: 12px;
  border: 2px solid #667eea;
}

.parallel-branches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
  padding: 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px dashed #cbd5e1;
}

.branch-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.branch-header {
  margin-bottom: 12px;
}

.branch-label {
  font-size: 12px;
  font-weight: 600;
  color: #667eea;
  background: white;
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid #667eea;
}

/* 条件分支工作流样式 */
.conditional-workflow {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.conditional-step-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.condition-branches {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.branch-option {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid;
}

.branch-option.true {
  color: #059669;
  background: #d1fae5;
  border-color: #10b981;
}

.branch-option.false {
  color: #dc2626;
  background: #fee2e2;
  border-color: #ef4444;
}

/* 增强的步骤项样式 - 紧凑布局 */
.step-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  margin-bottom: 6px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.3s ease;
  min-width: 280px;
  max-width: 400px;
}

.step-item.linear {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.step-item.branch {
  border-color: #8b5cf6;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}

.step-item.condition {
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.step-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.step-number {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.3;
}

.step-description {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.step-tool {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.tool-label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}

.tool-name {
  font-size: 11px;
  color: #667eea;
  font-weight: 600;
  background: #f0f4ff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e0e7ff;
}

/* 连接器样式 */
.step-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 8px 0;
}

.connector-line {
  width: 2px;
  height: 20px;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

.connector-arrow {
  font-size: 16px;
  color: #667eea;
  font-weight: bold;
  margin-top: 4px;
}

.step-connector.conditional .connector-line {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.step-connector.conditional .connector-arrow {
  color: #f59e0b;
}

/* 空状态样式 - 集成自ChatBox的优秀设计 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  text-align: center;
  color: #6b7280;
  padding: 40px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-text > div:first-child {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.empty-hint {
  font-size: 14px;
  color: #9ca3af;
}

/* 步骤项样式 */
.step-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.step-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.step-item.generated {
  animation: stepSlideIn 0.5s ease-out;
}

@keyframes stepSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-number {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
}

.step-description {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  color: #6b7280;
  line-height: 1.5;
}

.step-tool {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.tool-label {
  font-size: 13px;
  color: #9ca3af;
  font-weight: 500;
}

.tool-name {
  font-size: 13px;
  color: #667eea;
  font-weight: 600;
  background: #f0f4ff;
  padding: 4px 8px;
  border-radius: 6px;
}

/* 生成中指示器样式 */
.generating-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.generating-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.generating-dots span {
  width: 12px;
  height: 12px;
  background: #667eea;
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite both;
}

.generating-dots span:nth-child(1) { animation-delay: -0.32s; }
.generating-dots span:nth-child(2) { animation-delay: -0.16s; }
.generating-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.generating-text {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

/* 步骤工具推荐样式 */
.step-tool {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.tool-label {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
}

.tool-name {
  font-size: 12px;
  color: #667eea;
  font-weight: 600;
  background: #f0f4ff;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #e0e7ff;
}

/* 生成操作按钮区域 */
.generation-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.regenerate-btn {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.regenerate-btn:hover {
  background: #e2e8f0;
  color: #475569;
  transform: translateY(-1px);
}

.create-workflow-btn-inline {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.create-workflow-btn-inline:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ===== 重新设计的样式 ===== */

/* 步骤导航样式 */
.step-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.step-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.step-nav-item .step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  background: #e5e7eb;
  color: #6b7280;
  transition: all 0.3s ease;
}

.step-nav-item.active .step-number {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: scale(1.1);
}

.step-nav-item.completed .step-number {
  background: #10b981;
  color: white;
}

.step-label {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  transition: color 0.3s ease;
}

.step-nav-item.active .step-label {
  color: #667eea;
  font-weight: 600;
}

.step-nav-item.completed .step-label {
  color: #10b981;
}

.step-connector {
  width: 80px;
  height: 2px;
  background: #e5e7eb;
  margin: 0 20px;
}

/* 重新设计的内容区域 - 左右分栏 */
.modal-content-redesigned {
  flex: 1;
  display: flex;
  overflow: hidden;
  background: white;
}

/* 三栏布局内容区域 */
.modal-content-three-column {
  flex: 1;
  display: flex;
  overflow: hidden;
  background: white;
}

/* 两栏布局内容区域 */
.modal-content-two-column {
  flex: 1;
  display: flex;
  overflow: hidden;
  background: white;
}

/* 左侧输入面板 */
.input-panel {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: #f8fafc;
  border-right: 1px solid #e5e7eb;
}

/* 中间生成步骤面板 */
.generation-panel {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: #fafbfc;
  border-right: 1px solid #e5e7eb;
}

/* 两栏布局中的生成面板 */
.modal-content-two-column .generation-panel {
  flex: 1.5;
  border-right: none;
}

/* 右侧结果面板 */
.result-panel {
  flex: 1.2;
  padding: 24px;
  overflow-y: auto;
  background: white;
}

/* 模板选择样式 */
.template-selection {
  max-width: 800px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.section-header p {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.template-card {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  position: relative;
  overflow: hidden;
}

.template-card:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.template-card.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.template-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.template-content h4 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.template-content p {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.template-category {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.template-card.selected .template-category {
  background: #667eea;
  color: white;
}

/* 主要输入界面样式 */
.workflow-input-main {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.input-header {
  margin-bottom: 24px;
}

.input-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.input-header p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

/* 示例区域 */
.examples-section {
  margin-bottom: 24px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.examples-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 12px 0;
}

.examples-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.example-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.example-item:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.example-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.example-text {
  font-size: 13px;
  color: #374151;
  line-height: 1.4;
}

/* 生成按钮区域 */
.generate-actions {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.generate-steps-btn, .create-workflow-btn {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.generate-steps-btn:hover, .create-workflow-btn:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.generate-steps-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 右侧空状态 */
.empty-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #6b7280;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-result h3 {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
}

.empty-result p {
  font-size: 14px;
  color: #9ca3af;
  max-width: 300px;
  line-height: 1.5;
}

/* ===== 中间生成步骤面板样式 ===== */

/* 生成面板头部 */
.generation-header {
  margin-bottom: 24px;
  text-align: center;
}

.generation-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.generation-header p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

/* 等待生成状态 */
.generation-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.waiting-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.generation-waiting h4 {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
}

.generation-waiting p {
  font-size: 14px;
  color: #9ca3af;
  margin: 0 0 24px 0;
}

.generation-steps-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 250px;
}

.step-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #6b7280;
}

.step-preview .step-icon {
  font-size: 16px;
}

/* 生成过程状态 */
.generation-process {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.process-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: white;
  border: 2px solid #f3f4f6;
  border-radius: 12px;
  transition: all 0.3s ease;
  opacity: 0.5;
}

.process-step.active {
  opacity: 1;
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  transform: scale(1.02);
}

.process-step .step-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 50%;
  flex-shrink: 0;
}

.process-step.active .step-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.process-step .step-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.process-step .step-content p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.overall-progress {
  margin-top: 24px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.overall-progress .progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.overall-progress .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-text {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
}

/* 生成完成状态 */
.generation-complete {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
  border: 2px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
}

.complete-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.generation-complete h4 {
  font-size: 18px;
  font-weight: 700;
  color: #065f46;
  margin: 0 0 8px 0;
}

.generation-complete p {
  font-size: 14px;
  color: #047857;
  margin: 0 0 20px 0;
}

.generation-summary {
  width: 100%;
  margin-bottom: 20px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  font-size: 13px;
  color: #047857;
  font-weight: 500;
}

.summary-value {
  font-size: 13px;
  color: #065f46;
  font-weight: 600;
}

.regenerate-btn {
  padding: 10px 20px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.regenerate-btn:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 生成完成状态（包含步骤） */
.generation-complete-with-steps {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.complete-header {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
  border: 2px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  margin-bottom: 20px;
}

.complete-header .complete-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.complete-header h4 {
  font-size: 16px;
  font-weight: 700;
  color: #065f46;
  margin: 0 0 4px 0;
}

.complete-header p {
  font-size: 14px;
  color: #047857;
  margin: 0;
}

/* 生成操作按钮区域 */
.generation-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.create-workflow-btn-inline {
  flex: 1;
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.create-workflow-btn-inline:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.regenerate-btn {
  flex: 0.8;
}

/* 底部操作区域 */
.bottom-actions {
  padding: 20px 32px;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: center;
}

.bottom-actions .create-workflow-btn {
  max-width: 300px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  font-size: 18px;
  padding: 16px 32px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.bottom-actions .create-workflow-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

/* 需求输入样式 */
.requirement-input {
  max-width: 800px;
  margin: 0 auto;
}

.input-form {
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.workflow-title-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: white;
}

.workflow-title-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.workflow-description-input {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
}

.workflow-description-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.file-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.file-upload-area:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.02);
}

.upload-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 16px;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.upload-btn input {
  display: none;
}

.uploaded-files {
  margin-top: 16px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 8px;
}

.file-name {
  font-size: 14px;
  color: #374151;
  flex: 1;
}

.file-item button {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.file-item button:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* 步骤操作按钮 */
.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.back-btn, .next-btn, .generate-workflow-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-btn {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.back-btn:hover {
  background: #e5e7eb;
}

.next-btn, .generate-workflow-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.next-btn:hover, .generate-workflow-btn:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.next-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 工作流生成页面样式 */
.workflow-generation {
  max-width: 900px;
  margin: 0 auto;
}

.generation-start {
  text-align: center;
  padding: 60px 20px;
}

.generation-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.generation-start h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 16px 0;
}

.generation-start p {
  font-size: 16px;
  color: #6b7280;
  margin: 8px 0;
}

/* 生成的工作流展示 */
.generated-workflow {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.workflow-header {
  text-align: center;
  margin-bottom: 32px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.workflow-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.workflow-header p {
  font-size: 16px;
  color: #6b7280;
  margin: 0;
}

.steps-list {
  margin-bottom: 32px;
}

.step-item-redesigned {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: white;
  border: 2px solid #f3f4f6;
  border-radius: 12px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.step-item-redesigned::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.step-item-redesigned:hover {
  border-color: #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.step-number-redesigned {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.step-content-redesigned {
  flex: 1;
}

.step-title-redesigned {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.step-description-redesigned {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.step-tool-redesigned {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-label-redesigned {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
}

.tool-name-redesigned {
  font-size: 12px;
  color: #667eea;
  font-weight: 600;
  background: rgba(102, 126, 234, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
}

/* 工作流操作按钮 */
.workflow-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

/* 增强的生成指示器 */
.generating-indicator {
  text-align: center;
  padding: 60px 20px;
}

.generating-indicator .progress-bar {
  width: 300px;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  margin: 24px auto 0;
  overflow: hidden;
}

.generating-indicator .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .ai-workflow-modal-three-column {
    width: 98vw;
    height: 95vh;
    min-width: 800px;
  }

  .modal-content-three-column {
    flex-direction: column;
  }

  .input-panel, .generation-panel, .result-panel {
    flex: none;
    height: 33.33%;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .result-panel {
    border-bottom: none;
  }

  .modal-content-two-column {
    flex-direction: column;
  }

  .modal-content-two-column .input-panel,
  .modal-content-two-column .generation-panel {
    flex: none;
    height: 50%;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .modal-content-two-column .generation-panel {
    border-bottom: none;
  }
}

@media (max-width: 768px) {
  .ai-workflow-modal-redesigned, .ai-workflow-modal-three-column {
    width: 95vw;
    height: 90vh;
    min-width: auto;
  }

  .modal-content-redesigned, .modal-content-three-column {
    padding: 20px;
    flex-direction: column;
  }

  .input-panel, .generation-panel, .result-panel {
    padding: 16px;
  }

  .template-grid {
    grid-template-columns: 1fr;
  }

  .step-actions {
    flex-direction: column;
    gap: 12px;
  }

  .back-btn, .next-btn, .generate-workflow-btn {
    width: 100%;
    justify-content: center;
  }

  .workflow-actions {
    flex-direction: column;
    gap: 12px;
  }

  .generation-steps-preview {
    max-width: 100%;
  }

  .process-step {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

/* ============================= */
/* 增强分支工作流可视化样式 */
/* ============================= */

/* 混合工作流样式 */
.mixed-workflow {
  width: 100%;
}

.workflow-complexity-badge {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.complexity-indicator.high {
  font-size: 14px;
  font-weight: 600;
}

.complexity-desc {
  font-size: 12px;
  opacity: 0.9;
}

/* 混合步骤容器 - 缩小间距 */
.mixed-step-container {
  margin-bottom: 8px;
}

.step-item.mixed {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.step-item.mixed:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.step-item.mixed.hybrid {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}

.step-item.mixed.parallel {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.step-item.mixed.condition {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.step-item.mixed.convergence {
  border-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.step-item.mixed .step-number {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.step-item.mixed .step-icon {
  font-size: 16px;
}

.step-item.mixed .step-id {
  background: #4f46e5;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.step-metadata {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.step-type-badge .badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  color: white;
}

.badge.hybrid {
  background: #8b5cf6;
}

.badge.parallel {
  background: #3b82f6;
}

.badge.condition {
  background: #f59e0b;
}

.badge.convergence {
  background: #10b981;
}

.condition-branches.enhanced {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.condition-branches.enhanced .branch-option {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid;
}

.branch-option.true,
.branch-option.pass,
.branch-option.success,
.branch-option.exists {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.branch-option.false,
.branch-option.fail,
.branch-option.error,
.branch-option.none {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.step-connector.enhanced {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px 0;
  min-height: 40px;
}

/* 确保所有连接器可见 */
.step-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px 0;
  min-height: 40px;
}

.step-connector .connector-line,
.step-connector .connector-line.visible {
  width: 3px;
  height: 24px;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
  margin-bottom: 4px;
}

.step-connector .connector-arrow,
.step-connector .connector-arrow.visible {
  font-size: 16px;
  color: #667eea;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.step-connector.linear .connector-line {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.step-connector.linear .connector-arrow {
  color: #10b981;
}

.step-connector.conditional .connector-line {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.step-connector.conditional .connector-arrow {
  color: #f59e0b;
}

/* Enhanced连接器线条样式 */
.step-connector.enhanced.hybrid .connector-line {
  background: linear-gradient(180deg, #a855f7 0%, #7c3aed 100%);
  height: 28px;
  width: 5px;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(168, 85, 247, 0.3);
}

.step-connector.enhanced.parallel .connector-line {
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  height: 24px;
  width: 4px;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.step-connector.enhanced.condition .connector-line {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  height: 28px;
  width: 5px;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.step-connector.enhanced.convergence .connector-line {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  height: 32px;
  width: 6px;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.step-connector.enhanced.hybrid .connector-arrow {
  background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.step-connector.enhanced.parallel .connector-arrow {
  color: #3b82f6;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(59, 130, 246, 0.3);
}

.step-connector.enhanced.condition .connector-arrow {
  color: #f59e0b;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(245, 158, 11, 0.3);
}

.step-connector.enhanced.convergence .connector-arrow {
  color: #10b981;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(16, 185, 129, 0.3);
}

/* 生成覆盖层 */
.generation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  backdrop-filter: blur(2px);
}

.generation-progress {
  text-align: center;
}

.progress-dots {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 8px;
}

.progress-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #667eea;
  animation: dotPulse 1.4s infinite ease-in-out;
}

.progress-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.progress-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%, 60%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  30% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

.progress-text {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}
